package cn.ncu.service;

import cn.ncu.dao.UserDao;
import cn.ncu.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author:Martina
 * @create:2020-07-09 10:41
 * @description:
 */
@Service
@Transactional
public class UserServiceImpl implements UserService{

    @Autowired
    private UserDao userDao;

    @Override
    public void save(User user) {
        userDao.save(user);
    }

    @Override
    public User findByUserName(String username) {
        return userDao.findByUserName(username);
    }

    @Override
    public User findOneUser(User user) {
        return userDao.findOneUser(user);
    }
}
